<?php

namespace App\Models\Posts;

use App\Models\WxCircle;
use Dcat\Admin\Traits\HasDateTimeFormatter;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Model;

class WxUserCircle extends Model
{
	use HasDateTimeFormatter;
    //use SoftDeletes;

    protected $table = 'wx_user_circle';


    public function circle(){
        return $this->belongsTo(WxCircle::class,'circle_id','id');
    }

    public function isFollowCircle($uid,$circle_id)
    {
        return $this->where('user_id',$uid)
            ->where('circle_id',$circle_id)
            ->exists();
    }

}
